package com.kaishengit.web;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.kaishengit.entity.BookType;
import com.kaishengit.util.web.ServletUtil;

import service.BookTypeService;

public class BookTypeManager extends HttpServlet {
	private static final long serialVersionUID = 1L;
	BookTypeService service = new BookTypeService();

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		List<BookType> list=service.selectAll();
		
		//request.setAttribute("list", list);
		//request.getRequestDispatcher("/WEB-INF/views/admin/bookTypeManager.jsp").forward(request, response);
		ServletUtil.setRequestAttribute(request, "list", list);
		ServletUtil.forward(request, response, "/admin/bookTypeManager");
	}

}
